<?php

class Form_Newsletter extends Zend_Form
{
    public function __construct($options = null)
    {
        parent::__construct($options);
        $this->setName('abonne');

        $id = new Zend_Form_Element_Hidden('id');

        $name = new Zend_Form_Element_Text('name');
        $name->setLabel('newsletter_name')
        ->setRequired(true)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator('NotEmpty');
        
        $auteur = new Zend_Form_Element_Text('auteur');
        $auteur->setLabel('newsletter_auteur')
        ->setRequired(true)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator('NotEmpty');
        
        $statut = new Zend_Form_Element_Select('statut');
        $statut->setLabel('newsletter_statut')
        ->setRequired(true);      
        $statuts= array('public'=>'public','private'=>'private');        
        $statut->addMultiOptions($statuts);
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        
    
        $this->addElements(array($id,$name,$auteur,$statut,$submit));
    }
    
    
    
   
}